home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / AppMaker 2.0b3 / Demo AppMaker 1.5 / Demo AppMaker™ / Demo AppMaker™.rsrc / TmPT_105_ModalDialog < prev    next >
Encoding:
Text File  |  1992-04-08  |  2.0 KB  |  104 lines

  1. { %filename% -- Modal dialog}
  2. { Created %date% %time% by AppMaker}
  3.  
  4. {    This module overrides the AppMaker-generated code in z%dlogname%.%        %}
  5. {    It provides a place for you to add your own code and still be able to    }
  6. {    generate code for new changes to the user interface.  This module will    }
  7. {    not be regenerated by AppMaker unless you delete it.  Its superclass,    }
  8. {    z%dlogname%, may be regenerated to handle user interface changes%        %}
  9. {    without losing your hand-coded changes to this module.                    }
  10.  
  11. Unit %unitname%;
  12. Interface
  13.  
  14. Uses
  15.     TCL,
  16.     AMCL,
  17.     %AppName%Intf,
  18.     ResourceDefs;
  19.  
  20. {----------}
  21. Procedure Do%dlogname%    (aSupervisor:    CDirectorOwner);
  22.  
  23. {----------}
  24. Implementation
  25.  
  26. %for each item gen defineItem%
  27.  
  28. {----------}
  29. Procedure Do%dlogname%    (aSupervisor:    CDirectorOwner);
  30. var
  31.     dialog:            C%dlogname%;
  32.     dismisser:        longint;
  33.     fi:                FailInfo;
  34.  
  35.     {----------}
  36.     Procedure HandleFailure    (error:        Integer;
  37.                              message:    Longint);
  38.     Begin
  39.         ForgetObject (dialog);
  40.     End;
  41.  
  42. Begin
  43.     dialog := nil;
  44.     CatchFailures (fi, HandleFailure);
  45.  
  46.     New (dialog);
  47.     dialog.I%dlogname% (aSupervisor);
  48.  
  49.     {initialize dialog panes}
  50.  
  51.     dialog.BeginDialog;
  52.     dismisser := dialog.DoModalDialog (cmdOK);    
  53.  
  54.     if dismisser = cmdOK then begin
  55.         {extract values from dialog panes}
  56.     end;
  57.  
  58.     dialog.Free;
  59.  
  60.     Success;
  61. End; {Do%dlogname%}
  62.  
  63. {----------}
  64. Procedure C%dlogname%.I%dlogname%    (aSupervisor:    CDirectorOwner);
  65. Begin
  66.     inherited IZ%dlogname% (aSupervisor);
  67.  
  68.     {any additional initialization for your dialog}
  69.  
  70. End; {I%dlogname%}
  71.  
  72. %for each item gen auxiliaryMethod%
  73. {----------}
  74. Procedure C%dlogname%.UpdateMenus;
  75. Begin
  76.     inherited UpdateMenus;
  77.  
  78. End; {UpdateMenus}
  79.  
  80. {----------}
  81. Procedure C%dlogname%.DoCommand        (theCommand:    longint);
  82. Begin
  83.     case theCommand of
  84.         0:    ;
  85.         %for each item gen DoCommand%
  86.  
  87.         otherwise
  88.                 inherited DoCommand (theCommand);
  89.     end; {case}
  90.  
  91. End; {DoCommand}
  92.     
  93. {----------}
  94. Procedure C%dlogname%.ProviderChanged%    %(aProvider:    CCollaborator;
  95.                                          reason:        longint;
  96.                                          info:            univ Ptr);
  97.  
  98. Begin
  99.     %for each item gen ProviderChanged%
  100.  
  101. End; {ProviderChanged}
  102.  
  103. End. {%unitname%}
  104.